﻿using System.Data.Entity.ModelConfiguration;
using ZFine.Domain.Entity;

namespace Logic.Map.Project
{
    public class CourseMap : EntityTypeConfiguration<CourseEntity>
    {
        public CourseMap()
        {
            this.ToTable("Course");
            this.HasKey(t => t.F_Id);
            Property(p => p.F_Id).HasMaxLength(50);
            Property(p => p.F_CreatorUserId).HasMaxLength(50);
            Property(p => p.F_LastModifyUserId).HasMaxLength(50);
            Property(p => p.F_DeleteUserId).HasMaxLength(50);
            Property(p => p.Name).HasMaxLength(50);
            Property(x => x.CourseOldPrice).HasPrecision(18, 2);
            Property(x => x.CourseNowPrice).HasPrecision(18, 2);
            Property(x => x.XPoint).HasPrecision(18, 2);
            Property(x => x.YPoint).HasPrecision(18, 2);
            Property(p => p.CourseAlert).HasMaxLength(200);
            Property(p => p.RejectReason).HasMaxLength(200);

            // Property(x => x.F_thispric).HasPrecision(18,2)
        }
    }
}
